﻿@model ServerManager.Models.App

@{
    ViewData["Title"] = "CreateOrUpdate";
}

<div style="height:40px;line-height:40px;margin-top:10px;">
    <div style="float:left;font-size:2em;">应用新建或更新</div>
    <div style="float:right"><a class="btn btn-info" asp-action="Index">返回列表</a></div>
</div>

<hr />
<form asp-action="CreateOrUpdate">
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <table class="my-table col-md-12" style="height:50px;line-height:50px;">
        <tr>
            <td><label asp-for="Name" class="control-label"></label></td>
            <td>
                <input asp-for="Name" class="form-control" />
                <span asp-validation-for="Name" class="text-danger"></span>
            </td>
            <td><label asp-for="Url" class="control-label"></label></td>
            <td>
                <input asp-for="Url" class="form-control" />
                <span asp-validation-for="Url" class="text-danger"></span>
            </td>
        </tr>
        <tr>
            <td> <label asp-for="Manager" class="control-label"></label></td>
            <td>
                <input asp-for="Manager" class="form-control" />
                <span asp-validation-for="Manager" class="text-danger"></span>
            </td>
            <td> <label asp-for="Developer" class="control-label"></label></td>
            <td>
                <input asp-for="Developer" class="form-control" />
                <span asp-validation-for="Developer" class="text-danger"></span>
            </td>
        </tr>
        <tr>
            <td> <label asp-for="DeveloperContact" class="control-label"></label></td>
            <td>
                <input asp-for="DeveloperContact" class="form-control" />
                <span asp-validation-for="DeveloperContact" class="text-danger"></span>
            </td>
            <td><label asp-for="ServerId" class="control-label"></label></td>
            <td>
                <select asp-for="ServerId" class="form-control" asp-items="ViewBag.ServerList">
                    <option value="0">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <td><label asp-for="Remark" class="control-label"></label></td>
            <td>
                <textarea asp-for="Remark" class="form-control"></textarea>
                <span asp-validation-for="Remark" class="text-danger"></span>
            </td>
            <td></td>
            <td></td>
        </tr>
    </table>
    <div>
        <input type="submit" value="确定" class="btn btn-success" />
    </div>
</form>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
